import { combineReducers } from 'redux'
import { userSlice } from './slices/userSlice'
import { allProductsSlice } from './slices/allProductsSlice'
import { catalogSlice } from './slices/catalogSlice'
import { searchSlice } from './slices/searchSlice'
import { productSlice } from './slices/productSlice'
import { apiSlice } from './slices/api/apiSlice'
import { alertSlice } from './slices/alertSlice'
import { loadingSlice } from './slices/loadingSlice'

export const rootReducer = combineReducers({
	[apiSlice.reducerPath]: apiSlice.reducer,
	[userSlice.name]: userSlice.reducer,
	[allProductsSlice.name]: allProductsSlice.reducer,
	[catalogSlice.name]: catalogSlice.reducer,
	[searchSlice.name]: searchSlice.reducer,
	[productSlice.name]: productSlice.reducer,
	[alertSlice.name]: alertSlice.reducer,
	[loadingSlice.name]: loadingSlice.reducer,
})
